package com.example.intermingle.contrllor;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @author 绿松石
 * @version V1.0
 * @Title LoginContrllor
 * @Description
 * @date 2021年09月09日 16:58
 * @since V1.0
 */
@RestController
public class LoginContrllor {

    @RequestMapping( "/login_p" )
    public void login ( HttpServletResponse resp ) throws IOException {
        resp.setStatus ( HttpServletResponse.SC_UNAUTHORIZED );
        resp.setContentType ( "application/json;charset=UTF-8" );
        PrintWriter out = resp.getWriter ();
        out.write ( "{\"status\":\"error\",\"msg\":\"尚未登录，请登录!\"}" );
        out.flush ();
        out.close ();
    }
}
